package bsplib.q3bsp;

import flash.utils.ByteArray;

class Q3Vertex
{
    public static inline var DIR_INDEX : UInt = 10;
    
    public var pos : Q3Vec3f;
    public var texUV : Q3Vec2f;
    public var lmUV : Q3Vec2f;
    public var normal : Q3Vec3f;
    public var color : UInt;
    
    public function new( data : ByteArray )
    {
        pos = Q3Vec3f.FromByteArray(data);
        texUV = Q3Vec2f.FromByteArray(data);
        lmUV = Q3Vec2f.FromByteArray(data);
        normal = Q3Vec3f.FromByteArray(data);
        color = data.readUnsignedInt();
    }

}